﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Quicklight.Web.Commands {
   
   public class DelegateCommand : ICommand {
      private Action action;

      public DelegateCommand(Action action) {
         this.action = action;
      }

      public event EventHandler CanExecuteChanged;

      public bool CanExecute {
         get { return true; }
      }

      public void Execute() {
         action();
      }
   }
}
